﻿@model LandManager.Web.Models.LandInfo

@{
    var rangeList = ViewBag.LandRange;
    var agencyList = ViewBag.Agency;
    var wayList = ViewBag.GetWay;

    var reasonList = ViewBag.Reason;
    var certificationList = ViewBag.Certification;
    var landTypeList = ViewBag.LandType;

    List<string> isrentList = new List<string>()
    {
        "全部出租","部分出租","未出租"
    };

    List<string> ismortgageList = new List<string>() {
        "抵押","担保","未抵押/担保"
    };
}

@Scripts.Render("~/bundles/jqueryui")

<script type="text/javascript" src="/Scripts/jquery-ui-1.8.24.min.js"></script>
<link href="/Content/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />

<style type="text/css">
    .bodysty {
        font-family: 'Microsoft YaHei';
        font-size: 0.9em;
    }

    .titleSty {
        font-size: 1.2em;
        margin-top: 1px;
        font-weight: bold;
    }

    .tbSty {
        width: 100%;
        border: 0px;
        margin: 0px 0px;
        padding: 0px 0px;
        font-family: 'Microsoft YaHei';
        font-size: 0.8em;
    }

    .tb1Sty {
        width: 100%;
        border: 0px;
        padding: 0px 0px;
        margin-top: 0px;
        font-family: 'Microsoft YaHei';
        font-size: 0.8em;
    }

    .tdheadSty {
        background-color: #ACD6FF;
        margin-bottom: 3px;
        margin-top: 3px;
    }

    .txt330 {
        width: 330px;
        background-color: #ACD6FF;
        vertical-align: central;
    }

    .txt250 {
        width: 250px;
        background-color: #ACD6FF;
        vertical-align: central;
    }

    .txt250grey {
        width: 250px;
        background-color: #D0D0D0;
        vertical-align: central;
    }

    .txt200 {
        width: 200px;
        background-color: #ACD6FF;
        vertical-align: central;
    }

    .txt170 {
        width: 170px;
        background-color: #ACD6FF;
        vertical-align: central;
        margin-bottom: 3px;
        margin-top: 3px;
    }

    .txt150 {
        width: 150px;
        background-color: #ACD6FF;
        vertical-align: central;
        margin-bottom: 3px;
        margin-top: 3px;
    }

    .txt110 {
        width: 110px;
        background-color: #ACD6FF;
        vertical-align: central;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 3px;
        margin-top: 3px;
    }

    .txt110grey {
        width: 110px;
        background-color: #D0D0D0;
        vertical-align: central;
        margin-bottom: 3px;
        margin-top: 3px;
    }

    .select160 {
        width: 160px;
        background-color: #ACD6FF;
        text-align: center;
        vertical-align: central;
        margin-bottom: 3px;
        margin-top: 3px;
    }

    .tdwidth110 {
        text-align: right;
        width: 110px;
        padding-right: 5px;
    }

    .tdwidth130 {
        text-align: right;
        width: auto;
        padding-right: 5px;
    }

    .multitxt {
        background-color: #f2f2f1;
    }

    .txtAreahe50 {
        width: 875px;
        height: 50px;
        background-color: #D0D0D0;
    }

    .txtAreaBeizhu {
        width: 1045px;
        height: 50px;
        background-color: #D0D0D0;
        margin-left: 0px;
    }

    .txtAreahe30 {
        margin: 0px 0px;
        padding: 0px 0px;
        width: 600px;
        width: 610px\9;
        height: 30px;
        background-color: #D0D0D0;
    }

    .btnSty {
        width: 120px;
        height: 28px;
        margin: auto 20px auto 10px;
        vertical-align: central;
    }

    .titltd {
        background-color: #98ceff;
    }

    .innertb {
        width: 100%;
        border: 0px;
    }

    .aSty {
        width: 130px;
        height: 32px;
        line-height: 32px;
        vertical-align: central;
        margin: auto auto auto 10px;
        text-align: center;
        vertical-align: central;
        text-align: center;
        background: #2573c7;
        color: #fff;
        border: 0px;
        cursor: pointer;
        display: inline-block;
        text-decoration: none;
    }
</style>

<script type="text/javascript">
    $(function () {
        $("#land_ownDate, #land_certificate_Date, #land_rent_date, #land_mortgage_date").datepicker({
            closeText: '关闭',
            prevText: '<上月',
            nextText: '下月>',
            currentText: '今天',
            monthNames: ['一月', '二月', '三月', '四月', '五月', '六月',
            '七月', '八月', '九月', '十月', '十一月', '十二月'],
            monthNamesShort: ['一', '二', '三', '四', '五', '六',
            '七', '八', '九', '十', '十一', '十二'],
            dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
            dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
            dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
            weekHeader: '周',
            dateFormat: 'yy-mm-dd',
            firstDay: 1,
            isRTL: false,
            showMonthAfterYear: true,
            yearSuffix: '年',
            defaultDate: new Date()
        });

        if ($("#land_Is_rent").children('option:selected').val() == "未出租") {
            $('.rent').attr("disabled", "disabled");
        }
        else {
            $('.rent').removeAttr("disabled");
        }

        if ($("#land_Is_mortgage").children('option:selected').val() == "未抵押/担保") {
            $('.mortgage').attr("disabled", "disabled");
        }
        else {
            $('.mortgage').removeAttr("disabled");
        }

        if ($("#reasonSelect").children('option:selected').val() == "其他原因") {
            $('#land_certificate_others').removeAttr("readonly");
        }
        else {
            $('#land_certificate_others').attr("readonly", "readonly");
        }

    });

    function SelectChange() {

        if ($("#reasonSelect").children('option:selected').val() == "其他原因") {
            $('#land_certificate_others').removeAttr("readonly");
        }
        else {
            $('#land_certificate_others').attr("readonly", "readonly");
        }
    }

    function RentSelectChange() {
        if ($("#land_Is_rent").children('option:selected').val() == "未出租") {
            $('.rent').attr("disabled", "disabled");
        }
        else {
            $('.rent').removeAttr("disabled");
        }
    }

    function MortageSelectChange() {
        if ($("#land_Is_mortgage").children('option:selected').val() == "未抵押/担保") {
            $('.mortgage').attr("disabled", "disabled");
        }
        else {
            $('.mortgage').removeAttr("disabled");
        }
    }

</script>
@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <div style="width: 1050px; margin-left: 7px">
        <div style="width: 100%; margin-left: auto; margin-right: auto; text-align: center">
            <p class="titleSty">土地信息表</p>
        </div>
        <table class="tb1Sty" cellspacing="0px">
            <tr>
                <td colspan="8" class="titltd">
                    土地基本情况
                </td>
            </tr>
            <tr>
                @Html.HiddenFor(model => model.ZDBH)
                @Html.HiddenFor(model => model.land_isHandle)
                @*<td class="tdwidth110">宗地编号</td>
                    <td>
                        @Html.EditorFor(model => model.ZDBH)
                        @Html.ValidationMessageFor(model => model.ZDBH)
                    </td>*@
                <td>地籍号/地号</td>
                <td>
                    @Html.TextBoxFor(model => model.DJH)
                    @Html.ValidationMessageFor(model => model.DJH)
                </td>
                <td>土地面积(平方米)</td>
                <td>
                    @Html.TextBoxFor(model => model.land_area)
                    @Html.ValidationMessageFor(model => model.land_area)
                </td>
                <td>用地性质</td>
                <td>
                    <select id="land_type" name="land_type" class="select160">
                        @{
    if (null != landTypeList)
    {


        foreach (var item in landTypeList)
        {

            if (item.type_name == Model.land_type)
            {
                <option value="@item.type_name" selected>@item.type_name</option>
            }
            else
            {
                <option value="@item.type_name">@item.type_name</option>
            }
        }
    }
                        }
                    </select>
                </td>
            </tr>
            <tr>
                <td class="tdwidth110">所属二级单位</td>
                <td>
                    <select id="land_agency" name="land_agency" class="select160">
                        @{
    if (agencyList != null)
    {
        foreach (var item in agencyList)
        {
            if (item.agency_ID == Model.land_agency)
            {
                <option value="@item.agency_ID" selected>@item.agency_name</option>
            }
            else
            {
                <option value="@item.agency_ID">@item.agency_name</option>
            }
        }
    }
                        }

                    </select>
                </td>
                <td>是否为上市公司</td>
                <td>
                    @{
    if (Model.land_Is_IPO == 1)
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_Is_IPO" type="radio" value="1" checked />是
        </div>
                        <div style="float: left; margin-left: 10px">
                            <input name="land_Is_IPO" type="radio" value="0" />否
                        </div>
    }
    else
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_Is_IPO" type="radio" value="1" />是
        </div>
                        <div style="float: left; margin-left: 10px">
                            <input name="land_Is_IPO" type="radio" value="0" checked />否
                        </div>
    }
                    }

                </td>
                <td>取得时间</td>
                <td>
                    @*@Convert.ToDateTime(model.land_ownDate).ToString("yyyy-MM-dd ")*@
                    @*@Html.EditorFor(model => model.land_ownDate, new { id = "land_ownDate", @class = "txt110", value = "" })*@
                    @*@Html.ValidationMessageFor(model => model.land_ownDate)*@
                    <input id="land_ownDate" name="land_ownDate" type="text" class="txt110" value="@Convert.ToDateTime(Model.land_ownDate).ToString("yyyy-MM-dd ")" />
                </td>
                <td>账面原值</td>
                <td>
                    @Html.TextBoxFor(model => model.land_price, new { @class = "txt110" })
                    @Html.ValidationMessageFor(model => model.land_price)
                    @*<input id="land_price" name="land_price" type="text" class="txt110" />*@
                </td>
            </tr>
            <tr>
                <td class="tdwidth110">土地使用范围</td>
                <td>
                    <select id="land_range" name="land_range" class="select160">
                        @{
    if (null != rangeList)
    {
        foreach (var item in rangeList)
        {
            if (item.range_name == Model.land_range)
            {
                <option value="@item.range_name" selected>@item.range_name</option>
            }
            else
            {
                <option value="@item.range_name">@item.range_name</option>
            }
        }
    }
                        }
                    </select>
                </td>
                <td>土地取得方式</td>
                <td>
                    <select id="land_getway" name="land_getway" class="select160">
                        @{
    if (null != wayList)
    {
        foreach (var item in wayList)
        {
            if (item.way_name == Model.land_getway)
            {
                <option selected>@item.way_name</option>
            }
            else
            {
                <option>@item.way_name</option>
            }
        }
    }
                        }
                    </select>
                </td>
                <td>宗地位置</td>
                <td colspan="3">
                    @Html.TextBoxFor(model => model.land_location, new { @class = "txt330" })
                    @Html.ValidationMessageFor(model => model.land_location)
                    @*<input id="Text16" type="text" name="land_location" class="txt330" />*@
                </td>
            </tr>
            <tr>
                <td colspan="8">
                    <table class="innertb" cellspacing="0px">
                        <tr>
                            <td class="tdwidth110">土地使用人</td>
                            <td>
                                @Html.TextBoxFor(model => model.land_user, new { @class = "txt250" })
                                @Html.ValidationMessageFor(model => model.land_user)
                                @*<input id="land_user" name="land_user" type="text" class="txt250" />*@
                            </td>
                            <td>实际使用人</td>
                            <td>
                                @Html.TextBoxFor(model => model.land_actual_user, new { @class = "txt250" })
                                @Html.ValidationMessageFor(model => model.land_actual_user)
                                @*<input id="land_actual_user" name="land_actual_user" type="text" class="txt250" />*@
                            </td>
                            <td style="word-wrap: break-word; width: 80px; text-align: center;">使用者与权力人是否一致</td>
                            <td>
                                @{
    if (Model.land_is_usereqlobligee == 1)
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_is_usereqlobligee" value="1" type="radio" checked />是
        </div>
                                    <div style="float: left; margin-left: 10px">
                                        <input name="land_is_usereqlobligee" value="0" type="radio" />否
                                    </div>
    }
    else
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_is_usereqlobligee" value="1" type="radio" />是
        </div>
                                    <div style="float: left; margin-left: 10px">
                                        <input name="land_is_usereqlobligee" type="radio" value="0" checked />否
                                    </div>
    }
                                }
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <table class="tbSty" cellspacing="0px">
            <tr>
                <td colspan="8" class="titltd">
                    国有土地使用权证
                </td>
            </tr>
            <tr>
                <td class="tdwidth110">土地证办理情况</td>
                <td>
                    <select id="land_certificate_status" name="land_certificate_status" class="select160">
                        @{
    if (certificationList != null)
    {
        foreach (var item in certificationList)
        {
            if (item.certi_status == Model.land_certificate_status)
            {
                <option selected>@item.certi_status</option>
            }
            else
            {
                <option>@item.certi_status</option>
            }
        }
    }
                        }
                    </select>
                </td>
                <td>土地使用证权号</td>
                <td>
                    <input id="land_certificate_ID" name="land_certificate_ID" type="text" class="txt110" value="@Model.land_certificate_ID" />
                </td>
                <td>发证时间</td>
                <td>
                    <input name="land_certificate_Date" id="land_certificate_Date" type="text" class="txt110" value="@Model.land_certificate_Date" />
                </td>
                <td>发证机关</td>
                <td>
                    <input name="land_certificate_agency" type="text" class="txt110" value="@Model.land_certificate_agency" />
                </td>
            </tr>
            <tr>
                <td class="tdwidth110">未办理原因</td>
                <td>
                    <select id="reasonSelect" name="land_certificate_reason" class="select160" onchange="SelectChange()">
                        @{
    if (reasonList != null)
    {
        foreach (var item in reasonList)
        {
            if (item.reason_desc == Model.land_certificate_reason)
            {
                <option selected>@item.reason_desc</option>
            }
            else
            {
                <option>@item.reason_desc</option>
            }
        }
    }
                        }
                    </select>
                </td>
                <td>其他原因</td>
                <td colspan="5">
                    <textarea name="land_certificate_others" id="land_certificate_others" readonly="readonly" class="txtAreahe30" cols="20" name="S2" rows="2">@Model.land_certificate_others</textarea>
                </td>

            </tr>
            <tr>
                <td colspan="8">
                    <table class="innertb" cellspacing="0px">
                        <tr>
                            <td class="tdwidth110">现地上物情况</td>
                            <td>
                                <textarea id="land_up_desc" name=land_up_desc cols="20" rows="2" class="txtAreahe50">@Model.land_up_desc</textarea>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <table class="tbSty" cellspacing="0px">
            <tr>
                <td colspan="8" class="titltd">
                    出租情况
                </td>
            </tr>
            <tr>
                <td class="tdwidth110">是否出租</td>
                <td>
                    <select id="land_Is_rent" name="land_Is_rent" class="select160" onchange="RentSelectChange()">
                        @{
    if (isrentList != null)
    {
        foreach (var item in isrentList)
        {
            if (item == Model.land_Is_rent)
            {
                <option selected>@item</option>
            }
            else
            {
                <option>@item</option>
            }
        }
    }
                        }
                    </select>
                </td>
                <td>出租对象</td>
                <td>
                    <input id="land_rent_obj" name="land_rent_obj" disabled="disabled" value="@Model.land_rent_obj" type="text" class="txt250grey rent" />
                </td>
                <td>租期时间</td>
                <td>
                    <input id="land_rent_date" name="land_rent_date" disabled="disabled" value="@Model.land_rent_date" type="text" class="txt110grey rent" />
                </td>
                <td>是否有出租合同</td>
                <td>
                    @{
    if (Model.land_rent_contract == 1)
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_rent_contract" disabled="disabled" type="radio" value="1" class="rent" checked />是
        </div>
                        <div style="float: left; margin-left: 10px">
                            <input name="land_rent_contract" disabled="disabled" type="radio" value="0" class="rent" />否
                        </div>
    }
    else
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_rent_contract" disabled="disabled" type="radio" value="1" class="rent" />是
        </div>
                        <div style="float: left; margin-left: 10px">
                            <input name="land_rent_contract" disabled="disabled" type="radio" value="0" checked class="rent" />否
                        </div>
    }
                    }

                </td>
            </tr>
        </table>
        <table class="tbSty" cellspacing="0px">
            <tr>
                <td colspan="8" class="titltd">
                    抵押或担保情况
                </td>
            </tr>
            <tr>
                <td class="tdwidth110">是否抵押担保</td>
                <td>
                    <select id="land_Is_mortgage" name="land_Is_mortgage" class="select160" onchange="MortageSelectChange()">
                        @{
    if (ismortgageList != null)
    {
        foreach (var item in ismortgageList)
        {
            if (item == Model.land_Is_mortgage)
            {
                <option selected>@item</option>
            }
            else
            {
                <option>@item</option>
            }

        }
    }
                        }
                    </select>
                </td>
                <td>出租对象</td>
                <td>
                    <input name="land_mortgage_obj" type="text" value="@Model.land_mortgage_obj" disabled class="txt250grey mortgage" />
                </td>
                <td>抵押担保时间</td>
                <td>
                    <input id="land_mortgage_date" name="land_mortgage_date" value="@Model.land_mortgage_date" disabled type="text" class="txt110grey mortgage" />
                </td>
                <td>抵押担保面积</td>
                <td>
                    <input type="text" name="land_mortgage_area" value="@Model.land_mortgage_area" disabled class="txt110grey mortgage" />
                </td>
            </tr>
        </table>
        <table class="tbSty" cellspacing="0px">
            <tr>
                <td colspan="8" class="titltd">
                    土地开发利用情况
                </td>
            </tr>
            <tr>
                <td class="tdwidth130">是否已列入污染扰民搬迁</td>
                <td>
                    @{
    if (Model.land_is_pollution_removal == 1)
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_is_pollution_removal" value="1" type="radio" checked>是
        </div>
                        <div style="float: left; margin-left: 10px">
                            <input name="land_is_pollution_removal" value="0" type="radio">否
                        </div>
    }
    else
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_is_pollution_removal" value="1" type="radio">是
        </div>
                        <div style="float: left; margin-left: 10px">
                            <input name="land_is_pollution_removal" value="0" type="radio" checked>否
                        </div>
    }
                    }

                </td>
                <td>是否已列入拆迁范围</td>
                <td>
                    @{
    if (Model.land_is_removal == 1)
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_is_removal" value="1" type="radio" checked />是
        </div>
                        <div style="float: left; margin-left: 10px">
                            <input name="land_is_removal" value="0" type="radio" />否
                        </div>
    }
    else
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_is_removal" value="1" type="radio" />是
        </div>
                        <div style="float: left; margin-left: 10px">
                            <input name="land_is_removal" value="0" type="radio" checked />否
                        </div>
    }
                    }

                </td>
                <td>是否已列入棚户区改造计划</td>
                <td>
                    @{
    if (Model.land_is_shanty == 1)
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_is_shanty" value="1" type="radio" checked>是
        </div>
                        <div style="float: left; margin-left: 10px">
                            <input name="land_is_shanty" value="0" type="radio">否
                        </div>
    }
    else
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_is_shanty" value="1" type="radio">是
        </div>
                        <div style="float: left; margin-left: 10px">
                            <input name="land_is_shanty" value="0" type="radio" checked>否
                        </div>
    }
                    }

                </td>
                <td>是否已列入开发土地</td>
                <td>
                    @{
    if (Model.land_Is_development == 1)
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_Is_development" value="1" type="radio" checked>是
        </div>
                        <div style="float: left; margin-left: 10px">
                            <input name="land_Is_development" value="0" type="radio">否
                        </div>
    }
    else
    {
        <div style="float: left; margin-left: 10px">
            <input name="land_Is_development" value="1" type="radio">是
        </div>
                        <div style="float: left; margin-left: 10px">
                            <input name="land_Is_development" value="0" type="radio" checked>否
                        </div>
    }
                    }

                </td>
            </tr>
        </table>
        <table class="tbSty">
            <tr>
                <td class="titltd">
                    备注
                </td>
            </tr>
            <tr>
                <td>
                    <textarea name="land_remark" class="txtAreaBeizhu" cols="20" rows="3">@Model.land_remark</textarea>
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    <input id="Button1" type="submit" value="保存" class="aSty" />
                </td>
            </tr>
        </table>
    </div>
}


<br />
<div>
    @Html.ActionLink("返回土地资源列表", "Index", null, new { @class = "aSty", title = "返回土地资源列表" })
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}